import os
import json


def get_root_path():
    # 获取文件目录
    cur_path = os.path.abspath(os.path.dirname(__file__))
    # 获取项目根路径，内容为当前项目的名字
    root_path = cur_path[:cur_path.rfind("e-based-qt") + len("e-base-qt") + 1]
    return root_path


BASE_PATH = get_root_path()
COLD_BACKUP_BAT = ""
PRETRAIN_BERT_PATH = os.path.abspath(os.path.join(BASE_PATH, os.path.pardir))
DATA_PATH = os.path.join(BASE_PATH, "data/")

MODELS_PATH = os.path.join(BASE_PATH, 'Models')
TMP_PATH = os.path.join(BASE_PATH, "tmp")
